package com.zc.redisson.stream.service;


import com.alibaba.fastjson.JSONObject;

import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import java.io.StringWriter;
import java.time.LocalDateTime;
import java.util.Map;
import java.util.Set;

/**
 * redis stream监听消息
 */
@Component
public class PhoenixAlarmService {

    private final Logger logger = LoggerFactory.getLogger(PhoenixAlarmService.class);

    @Autowired
    private RedisTemplate redisTemplate;


    public void onMessage(Map<String, String> valueMap) {
        try {
            logger.info("统告警消息内容:{}",valueMap);
        } catch (Exception e) {
            logger.error("系统告警处理异常",e);
        }
    }


}
